import Vue from 'vue'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false
import axios from 'axios'
import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios);
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')


//请求拦截  http request
axios.interceptors.request.use(req=>{
  // console.log("---------------",req);
  //这里相当于中间站,要继续返回给后台
  return req;
});
axios.interceptors.response.use(res=>{
  // console.log('+++++++++++',res.data);
  return res;
});